<?php
/**
 * @author shuang
 * @date 2016-10-27 10:40:40
 */
?>
<div class="task-type-title" id="search-type">
    <div>
        <span class="mui-icon mui-icon-search"></span>
        <?php echo $selectTypename; ?>
    </div>
</div>
<div id="refreshContainer" class="mui-content mui-scroll-wrapper" style="margin-top:88px;">
    <div class="mui-scroll">
        <ul class="mui-table-view">
            <?php foreach ($topData as $item): ?>
                <li class="mui-table-view-cell">
                    <div class="mui-table">
                        <div class="mui-table-cell mui-col-xs-8">
                            <h5>单价：<font color="red">￥<?php echo Yii::$app->formatter->asDecimal($item["brush_price"]); ?></font>，剩余：<?php echo \common\components\MTools::IntFormat($item["number"] - $item["taskcount"]); ?></h5>
                            <p class="mui-h6 mui-ellipsis"><?php echo $item["title"]; ?></p>
                        </div>
                        <div class="mui-table-cell mui-col-xs-4 mui-text-right">
                            <span class="mui-h5"><button type="button" class="mui-btn mui-btn-danger" url="<?php echo \yii\helpers\Url::toRoute(["task/validatetask","taskid"=>$item["id"],"tasknum"=> \common\components\MTools::IntFormat($item["number"] - $item["taskcount"])]);?>">马上抢&nbsp;></button></span>
                        </div>
                    </div>
                </li>
            <?php endforeach; ?>
        </ul>
    </div>
</div>
<?php $this->beginBlock('taskwork') ?>
app.taskwork({pickerDict:<?php echo yii\helpers\Json::encode($typeDict); ?>,type:<?php echo $type; ?>});
<?php $this->endBlock() ?>  
<?php $this->registerJs($this->blocks['taskwork'], \yii\web\View::POS_END); ?>